<?php

class musers extends CI_Model{
    
    private $tbl = "users";
    
    public function fetchAll(){
        return $this->db->get($this->tbl)->result();
    }
    
    public function fetchOne($id){
        return $this->db->where('id',$id)->get($this->tbl)->row();
    }
    
    public function insert($arr = array()){
        $this->db->insert($this->tbl,$arr);
    }
    
    public function update($id,$arr = array()){
        $this->db->where('id',$id)->update($this->tbl,$arr);
    }
    
    public function getCusByEmail($email) {
        return $this->db->where('email', $email)->get($this->tbl)->row_array();
    }   
      
}
